import request from "../request";
import {FetchMajorOptRes, ResponseRET, UserRoleListRes} from "../../types/responseTypes";

/**
 * 获取参数列表
 * @param CSNAME
 * @param userId
 */
export const getOptionsOf = (CSNAME: string, userId: string | number): Promise<ResponseRET> => request.post('/restapi/STUA_mbreport_new/RDCSS_CSTYPE',{
    CSNAME,
    OPERATOR_ID: userId
},true)

/**
 * 获取专业列表
 * @param userId
 */
export const getMajorOpt = (userId: string | number): Promise<FetchMajorOptRes> => request.post('/restapi/STUA_mbreport_new/RDMAJORS_LIST', {
    OPERATOR_ID: userId
}, true)

/**
 * 查看角色列表
 * @param userId
 */
export const getRoleList = (userId: string | number): Promise<UserRoleListRes> => request.post('/restapi/STUA_mbreport_new/RDROLES_LIST',{
    OPERATOR_ID: userId
}, true)

/**
 * 查看证件类型列表
 * @param userId
 */
export const getZZTypesList = (userId: string | number): Promise<UserRoleListRes> => request.post('/restapi/STUA_mbreport_new/RDZZTYPES_LIST',{
    OPERATOR_ID: userId
}, true)
